﻿using System;

namespace Silversocial.Client.Modules.Tests.Stubs
{
    public class LoginDataProviderStub : ILoginDataProvider
    {
        private EventHandler<ValidateUserCompletedEventArgs> validateUserCompleted = delegate { };

        public Action<User> ValidateUser = delegate { };

        public void RaiseValidateUserCompleted(ValidateUserCompletedEventArgs args)
        {
            this.validateUserCompleted(this, args);
        }

        event EventHandler<ValidateUserCompletedEventArgs> ILoginDataProvider.ValidateUserCompleted
        {
            add { this.validateUserCompleted += value; }
            remove { this.validateUserCompleted -= value; }
        }

        void ILoginDataProvider.ValidateUser(User user)
        {
            this.ValidateUser(user);
        }
    }
}
